package flash3.framework
{
	public class MapManager
	{
		protected var _map:Map = new Map();
		
		public function MapManager()
		{
		}
		
		public function add(key:*, value:*):void
		{
			_map.put(key, value);
		}
		
		public function remove(key:*):void
		{
			if(!_map.containsKey(key))
				return;
			
			_map.remove(key);
		}
		
		public function value(key:*):*
		{
			if(!_map.containsKey(key))
				return null;
			
			return _map.getValue(key);
		}
		
		public function values():Array
		{
			return _map.values();
		}
		
		public function keys():Array
		{
			return _map.keys();
		}
		
		public function get length():Number
		{
			return _map.size();
		}
		
		public function clear():void
		{
			_map.clear();
		}
	}
}